<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <input type="text" v-model="firstname"> +
        <input type="text" v-model="lastname"> = 
        {{fullname}}
    </div>
</body>
<script>
    const vm = new Vue({
        el: '#app',
        data: {
            firstname: '',
            lastname: '',
            //fullname: '' //vue.js:634 [Vue warn]: The computed property "fullname" is already defined in data.
        },
        computed: {
            fullname() {
                console.log(1);
                return this.firstname + this.lastname;
            }
        }
    })
</script>
</body>
</html>